Programming Languages

Within the IECClosed"International Electrotechnical Commission" IEC is a not-for-profit, non-governmental international standards organization that prepares and publishes International Standards for all electrical, electronic and related technologies 11631 standard, syntax and semantics of the programming languages have been defined, leaving no room for variance. Once you have learned them, you can use a wide variety of systems based on this standard.

The languages consist of two textual and three graphical versions:

Textual:

Graphical

All five languages are interlinked: they provide a common suite. The choice of programming language depends on:

  • the programmer's background
  • the problem at hand
  • the level of describing the problem
  • the structure of the control system
  • the interface to other people / departments

Sequential Function Chart (SFC)

SFC describes graphically the sequential behavior of a control program. It is derived from Petri Nets.

SFC organizes the internal structure of a program, and helps to deconstruct a control problem into manageable parts, while maintaining the overview.

SFC consists of steps, linked with Action Blocks and Transitions. Each step represents a particular state of the systems being controlled. A transition is associated with a condition, which, when true, causes the step before the transition to be deactivated, and the next step to be activated. Steps are linked to action blocks, performing a specific control action. Each element can be programmed in any of the IEC languages, including SFC itself.

Alternative and Parallel Sequences

You can use alternative sequences and even parallel sequences, like those commonly required in batch applications. For example, one sequence is used for the primary process, and the second for monitoring the overall operating constraints.

As shown in the following picture, parallel sequences are also possible:

Example of a Parallel Sequence in SFC

Figure 5-1: Example of a Parallel Sequence in SFC

From step 1, it either goes to step 2a or step 2b, depending on which of the transition conditions is met. Both conditions need to exclude each other.

Structured Text (ST)

ST is a very powerful high-level language with its roots in ADA, Pascal and “C”. It contains all the essential elements of a modern programming language, including selection branches (IF-THEN-ELSE and CASE OF) and iteration loops (FOR, WHILE and REPEAT). These elements can also be nested. It can be used for the definition of complex function blocks, which can be used within any of the other languages.

Function Block Diagram (FBD)

FBD is very common to the process industry. It expresses the behavior of functions, function blocks and programs as a set of interconnected graphical blocks, as in electronic circuit diagrams. It looks at a system in terms of the flow of signals between processing elements.

Free Form Ladder Diagram (FFLD)

FFLD is based on the graphical presentation of Relay Ladder Logic.

Instruction List (IL)

IL is the European counterpart of FFLD. As textual language, it looks like Assembler.